package com.eastcom.providor.service.impl;

import java.util.Date;
import java.util.List;

import com.eastcom.bm.atom.Atom_PPMMonitor;
import com.eastcom.client.PPMmoniorBean;
import com.eastcom.providor.dao.IPPMMonitorDao;
import com.eastcom.providor.service.BaseService;
import com.eastcom.providor.service.IPPMMonitorService;

public class PPMMonitorService extends BaseService implements IPPMMonitorService {

	private IPPMMonitorDao ppmMonitorDao;
	
	public void setPpmMonitorDao(IPPMMonitorDao ppmMonitorDao) {
		this.ppmMonitorDao = ppmMonitorDao;
	}

	public List<Atom_PPMMonitor> selectHistoryPPMMonitorByParams(String groupId,Date startDate, Date endDate) {
		try{
			return ppmMonitorDao.selectHistoryPPMMonitorByParams(groupId, startDate, endDate);
		}
		catch(Exception e){
			log.error("PPMMonitorService selectPPMMonitorByParams error", e);
		}
		return null;
	}

	public List<Atom_PPMMonitor> selectPPMMonitorByParams(String groupId, String granularity, Date upTime) {
		try{
			return ppmMonitorDao.selectPPMMonitorByParams(groupId, granularity, upTime);
		}
		catch(Exception e){
			log.error("PPMMonitorService selectPPMMonitorByParams error", e);
		}
		return null;
	}

	public List<PPMmoniorBean> selectHistoryPPMMonitorBeanByParams(String groupId, Date startDate, Date endDate) {
		try{
			return ppmMonitorDao.selectHistoryPPMMonitorBeanByParams(groupId, startDate, endDate);
		}
		catch(Exception e){
			log.error("PPMMonitorService selectHistoryPPMMonitorBeanByParams error", e);
		}
		return null;
	}

}
